package com.bafa.front.events;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.bafa.jdbc.DBAccess;
import com.bafa.objects.PageBean;
import com.bafa.services.ControlPanelServices;

public class EditControlPanelEvent extends Event {

	@Override
	public void doEvent(HttpServletRequest request,
			HttpServletResponse response, PageBean page) {
		DBAccess db = new DBAccess();
		
		message.addAllMessages(ControlPanelServices.updateLeagueName(request.getParameter("sitename")));
			
		message.addAllMessages(ControlPanelServices.updateTheme(request.getParameter("style")));
		request.getSession().removeAttribute("SITEBEAN");
		DisplayControlPanelEvent event = new DisplayControlPanelEvent();
		event.doEvent(request,response,page);

	}

}
